Optimal. Leaf size=200 \[ -\frac {a+b \tanh ^{-1}(c x)}{d x}+\frac {b c \log (x)}{d}-\frac {a e \log (x)}{d^2}-\frac {e \left (a+b \tanh ^{-1}(c x)\right ) \log \left (\frac {2}{1+c x}\right )}{d^2}+\frac {e \left (a+b \tanh ^{-1}(c x)\right ) \log \left (\frac {2 c (d+e x)}{(c d+e) (1+c x)}\right )}{d^2}-\frac {b c \log \left (1-c^2 x^2\right )}{2 d}+\frac {b e \text {PolyLog}(2,-c x)}{2 d^2}-\frac {b e \text {PolyLog}(2,c x)}{2 d^2}+\frac {b e \text {PolyLog}\left (2,1-\frac {2}{1+c x}\right )}{2 d^2}-\frac {b e \text {PolyLog}\left (2,1-\frac {2 c (d+e x)}{(c d+e) (1+c x)}\right )}{2 d^2} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.15, antiderivative size = 200, normalized size of antiderivative = 1.00, number of steps
used = 12, number of rules used = 11, integrand size = 19, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.579, Rules used = {6087, 6037,
272, 36, 29, 31, 6031, 6057, 2449, 2352, 2497} \begin {gather*} -\frac {e \log \left (\frac {2}{c x+1}\right ) \left (a+b \tanh ^{-1}(c x)\right )}{d^2}+\frac {e \left (a+b \tanh ^{-1}(c x)\right ) \log \left (\frac {2 c (d+e x)}{(c x+1) (c d+e)}\right )}{d^2}-\frac {a+b \tanh ^{-1}(c x)}{d x}-\frac {a e \log (x)}{d^2}-\frac {b c \log \left (1-c^2 x^2\right )}{2 d}+\frac {b e \text {Li}_2(-c x)}{2 d^2}-\frac {b e \text {Li}_2(c x)}{2 d^2}+\frac {b e \text {Li}_2\left (1-\frac {2}{c x+1}\right )}{2 d^2}-\frac {b e \text {Li}_2\left (1-\frac {2 c (d+e x)}{(c d+e) (c x+1)}\right )}{2 d^2}+\frac {b c \log (x)}{d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 29
Rule 31
Rule 36
Rule 272
Rule 2352
Rule 2449
Rule 2497
Rule 6031
Rule 6037
Rule 6057
Rule 6087
Rubi steps
\begin {align*} \int \frac {a+b \tanh ^{-1}(c x)}{x^2 (d+e x)} \, dx &=\int \left (\frac {a+b \tanh ^{-1}(c x)}{d x^2}-\frac {e \left (a+b \tanh ^{-1}(c x)\right )}{d^2 x}+\frac {e^2 \left (a+b \tanh ^{-1}(c x)\right )}{d^2 (d+e x)}\right ) \, dx\\ &=\frac {\int \frac {a+b \tanh ^{-1}(c x)}{x^2} \, dx}{d}-\frac {e \int \frac {a+b \tanh ^{-1}(c x)}{x} \, dx}{d^2}+\frac {e^2 \int \frac {a+b \tanh ^{-1}(c x)}{d+e x} \, dx}{d^2}\\ &=-\frac {a+b \tanh ^{-1}(c x)}{d x}-\frac {a e \log (x)}{d^2}-\frac {e \left (a+b \tanh ^{-1}(c x)\right ) \log \left (\frac {2}{1+c x}\right )}{d^2}+\frac {e \left (a+b \tanh ^{-1}(c x)\right ) \log \left (\frac {2 c (d+e x)}{(c d+e) (1+c x)}\right )}{d^2}+\frac {b e \text {Li}_2(-c x)}{2 d^2}-\frac {b e \text {Li}_2(c x)}{2 d^2}+\frac {(b c) \int \frac {1}{x \left (1-c^2 x^2\right )} \, dx}{d}+\frac {(b c e) \int \frac {\log \left (\frac {2}{1+c x}\right )}{1-c^2 x^2} \, dx}{d^2}-\frac {(b c e) \int \frac {\log \left (\frac {2 c (d+e x)}{(c d+e) (1+c x)}\right )}{1-c^2 x^2} \, dx}{d^2}\\ &=-\frac {a+b \tanh ^{-1}(c x)}{d x}-\frac {a e \log (x)}{d^2}-\frac {e \left (a+b \tanh ^{-1}(c x)\right ) \log \left (\frac {2}{1+c x}\right )}{d^2}+\frac {e \left (a+b \tanh ^{-1}(c x)\right ) \log \left (\frac {2 c (d+e x)}{(c d+e) (1+c x)}\right )}{d^2}+\frac {b e \text {Li}_2(-c x)}{2 d^2}-\frac {b e \text {Li}_2(c x)}{2 d^2}-\frac {b e \text {Li}_2\left (1-\frac {2 c (d+e x)}{(c d+e) (1+c x)}\right )}{2 d^2}+\frac {(b c) \text {Subst}\left (\int \frac {1}{x \left (1-c^2 x\right )} \, dx,x,x^2\right )}{2 d}+\frac {(b e) \text {Subst}\left (\int \frac {\log (2 x)}{1-2 x} \, dx,x,\frac {1}{1+c x}\right )}{d^2}\\ &=-\frac {a+b \tanh ^{-1}(c x)}{d x}-\frac {a e \log (x)}{d^2}-\frac {e \left (a+b \tanh ^{-1}(c x)\right ) \log \left (\frac {2}{1+c x}\right )}{d^2}+\frac {e \left (a+b \tanh ^{-1}(c x)\right ) \log \left (\frac {2 c (d+e x)}{(c d+e) (1+c x)}\right )}{d^2}+\frac {b e \text {Li}_2(-c x)}{2 d^2}-\frac {b e \text {Li}_2(c x)}{2 d^2}+\frac {b e \text {Li}_2\left (1-\frac {2}{1+c x}\right )}{2 d^2}-\frac {b e \text {Li}_2\left (1-\frac {2 c (d+e x)}{(c d+e) (1+c x)}\right )}{2 d^2}+\frac {(b c) \text {Subst}\left (\int \frac {1}{x} \, dx,x,x^2\right )}{2 d}+\frac {\left (b c^3\right ) \text {Subst}\left (\int \frac {1}{1-c^2 x} \, dx,x,x^2\right )}{2 d}\\ &=-\frac {a+b \tanh ^{-1}(c x)}{d x}+\frac {b c \log (x)}{d}-\frac {a e \log (x)}{d^2}-\frac {e \left (a+b \tanh ^{-1}(c x)\right ) \log \left (\frac {2}{1+c x}\right )}{d^2}+\frac {e \left (a+b \tanh ^{-1}(c x)\right ) \log \left (\frac {2 c (d+e x)}{(c d+e) (1+c x)}\right )}{d^2}-\frac {b c \log \left (1-c^2 x^2\right )}{2 d}+\frac {b e \text {Li}_2(-c x)}{2 d^2}-\frac {b e \text {Li}_2(c x)}{2 d^2}+\frac {b e \text {Li}_2\left (1-\frac {2}{1+c x}\right )}{2 d^2}-\frac {b e \text {Li}_2\left (1-\frac {2 c (d+e x)}{(c d+e) (1+c x)}\right )}{2 d^2}\\ \end {align*}
________________________________________________________________________________________
Mathematica [C] Result contains complex when optimal does not.
time = 2.23, size = 360, normalized size = 1.80 \begin {gather*} -\frac {\frac {2 a d^2}{x}-i b d e \pi \tanh ^{-1}(c x)+\frac {2 b d^2 \tanh ^{-1}(c x)}{x}-2 b d e \tanh ^{-1}\left (\frac {c d}{e}\right ) \tanh ^{-1}(c x)+b d e \tanh ^{-1}(c x)^2-\frac {b e^2 \tanh ^{-1}(c x)^2}{c}+\frac {b \sqrt {1-\frac {c^2 d^2}{e^2}} e^2 e^{-\tanh ^{-1}\left (\frac {c d}{e}\right )} \tanh ^{-1}(c x)^2}{c}+2 b d e \tanh ^{-1}(c x) \log \left (1-e^{-2 \tanh ^{-1}(c x)}\right )+i b d e \pi \log \left (1+e^{2 \tanh ^{-1}(c x)}\right )-2 b d e \tanh ^{-1}\left (\frac {c d}{e}\right ) \log \left (1-e^{-2 \left (\tanh ^{-1}\left (\frac {c d}{e}\right )+\tanh ^{-1}(c x)\right )}\right )-2 b d e \tanh ^{-1}(c x) \log \left (1-e^{-2 \left (\tanh ^{-1}\left (\frac {c d}{e}\right )+\tanh ^{-1}(c x)\right )}\right )+2 a d e \log (x)-2 a d e \log (d+e x)-2 b c d^2 \log \left (\frac {c x}{\sqrt {1-c^2 x^2}}\right )+\frac {1}{2} i b d e \pi \log \left (1-c^2 x^2\right )+2 b d e \tanh ^{-1}\left (\frac {c d}{e}\right ) \log \left (i \sinh \left (\tanh ^{-1}\left (\frac {c d}{e}\right )+\tanh ^{-1}(c x)\right )\right )-b d e \text {PolyLog}\left (2,e^{-2 \tanh ^{-1}(c x)}\right )+b d e \text {PolyLog}\left (2,e^{-2 \left (\tanh ^{-1}\left (\frac {c d}{e}\right )+\tanh ^{-1}(c x)\right )}\right )}{2 d^3} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 3.70, size = 317, normalized size = 1.58
method | result | size |
risch | \(\frac {c b \ln \left (-c x \right )}{2 d}-\frac {c b \ln \left (-c x +1\right )}{2 d}+\frac {b \ln \left (-c x +1\right )}{2 d x}-\frac {b e \dilog \left (\frac {\left (-c x +1\right ) e -d c -e}{-d c -e}\right )}{2 d^{2}}-\frac {b e \ln \left (-c x +1\right ) \ln \left (\frac {\left (-c x +1\right ) e -d c -e}{-d c -e}\right )}{2 d^{2}}-\frac {b \dilog \left (-c x +1\right ) e}{2 d^{2}}+\frac {a e \ln \left (\left (-c x +1\right ) e -d c -e \right )}{d^{2}}-\frac {a}{d x}-\frac {a e \ln \left (-c x \right )}{d^{2}}+\frac {b c \ln \left (c x \right )}{2 d}-\frac {b c \ln \left (c x +1\right )}{2 d}-\frac {b \ln \left (c x +1\right )}{2 d x}+\frac {b e \dilog \left (\frac {\left (c x +1\right ) e +d c -e}{d c -e}\right )}{2 d^{2}}+\frac {b e \ln \left (c x +1\right ) \ln \left (\frac {\left (c x +1\right ) e +d c -e}{d c -e}\right )}{2 d^{2}}+\frac {b \dilog \left (c x +1\right ) e}{2 d^{2}}\) | \(301\) |
derivativedivides | \(c \left (\frac {a e \ln \left (c e x +d c \right )}{c \,d^{2}}-\frac {a}{d c x}-\frac {a e \ln \left (c x \right )}{c \,d^{2}}+\frac {b \arctanh \left (c x \right ) e \ln \left (c e x +d c \right )}{c \,d^{2}}-\frac {b \arctanh \left (c x \right )}{d c x}-\frac {b \arctanh \left (c x \right ) e \ln \left (c x \right )}{c \,d^{2}}-\frac {b \ln \left (c x +1\right )}{2 d}-\frac {b \ln \left (c x -1\right )}{2 d}+\frac {b \ln \left (c x \right )}{d}+\frac {b e \dilog \left (c x +1\right )}{2 c \,d^{2}}+\frac {b e \ln \left (c x \right ) \ln \left (c x +1\right )}{2 c \,d^{2}}+\frac {b e \dilog \left (c x \right )}{2 c \,d^{2}}+\frac {b \ln \left (c e x +d c \right ) \ln \left (\frac {c e x -e}{-d c -e}\right ) e}{2 c \,d^{2}}+\frac {b \dilog \left (\frac {c e x -e}{-d c -e}\right ) e}{2 c \,d^{2}}-\frac {b \ln \left (c e x +d c \right ) \ln \left (\frac {c e x +e}{-d c +e}\right ) e}{2 c \,d^{2}}-\frac {b \dilog \left (\frac {c e x +e}{-d c +e}\right ) e}{2 c \,d^{2}}\right )\) | \(317\) |
default | \(c \left (\frac {a e \ln \left (c e x +d c \right )}{c \,d^{2}}-\frac {a}{d c x}-\frac {a e \ln \left (c x \right )}{c \,d^{2}}+\frac {b \arctanh \left (c x \right ) e \ln \left (c e x +d c \right )}{c \,d^{2}}-\frac {b \arctanh \left (c x \right )}{d c x}-\frac {b \arctanh \left (c x \right ) e \ln \left (c x \right )}{c \,d^{2}}-\frac {b \ln \left (c x +1\right )}{2 d}-\frac {b \ln \left (c x -1\right )}{2 d}+\frac {b \ln \left (c x \right )}{d}+\frac {b e \dilog \left (c x +1\right )}{2 c \,d^{2}}+\frac {b e \ln \left (c x \right ) \ln \left (c x +1\right )}{2 c \,d^{2}}+\frac {b e \dilog \left (c x \right )}{2 c \,d^{2}}+\frac {b \ln \left (c e x +d c \right ) \ln \left (\frac {c e x -e}{-d c -e}\right ) e}{2 c \,d^{2}}+\frac {b \dilog \left (\frac {c e x -e}{-d c -e}\right ) e}{2 c \,d^{2}}-\frac {b \ln \left (c e x +d c \right ) \ln \left (\frac {c e x +e}{-d c +e}\right ) e}{2 c \,d^{2}}-\frac {b \dilog \left (\frac {c e x +e}{-d c +e}\right ) e}{2 c \,d^{2}}\right )\) | \(317\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {a + b \operatorname {atanh}{\left (c x \right )}}{x^{2} \left (d + e x\right )}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.00 \begin {gather*} \int \frac {a+b\,\mathrm {atanh}\left (c\,x\right )}{x^2\,\left (d+e\,x\right )} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________